﻿#include<stdio.h>
int main()
{
	int a, b, c;
	int i;
	int sum = 0;
	int buf[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 };
	printf("请输入年月日：\n");
	scanf_s("%d%d%d", &a, &b, &c);
	for (i = 0; i < b -1 ; i++)
	{
		sum = sum + buf[i];
	}
	sum = sum + c;
	if (b > 2 && ((a % 4 == 0 && a % 100 != 0) || (a % 400 == 0)))
	{
		sum = sum + 1;
	}
	printf("sum=%d", sum);
	return 0;
}